#ifndef _MANHATTAN_LINE_H_
#define _MANHATTAN_LINE_H_

#include "segment.h"
#include "rayintersections.h"


enum manhattan_part_t
{
    VERT_PART,
    HOR_PART,
    BASE_PART
};

struct manhattan_line_t
{
    manhattan_line_t(point_t const & start, point_t const & end);

    double intersects(segment_t const & seg, manhattan_part_t part) const;

    segment_t part(manhattan_part_t p) const;
    segment_t vert_seg() const;
    segment_t hor_seg() const;
    segment_t base_seg() const;
    point_t corner() const;

private:
    point_t start_;
    point_t end_;
};

#endif
